/*
* BankService
*
* r2
*
* GNU General Public License v3.0
*/

package com.acme.bankapp.service.bank;

import com.acme.bankapp.domain.account.Account;
import com.acme.bankapp.domain.bank.*;
import com.acme.bankapp.domain.client.*;
import com.acme.bankapp.exceptions.*;

public class BankService {

	public void addClient(Bank bank, Client client, Account... accounts) throws ClientExistsException {
		bank.addClient(client);
		
		for(Account a : accounts) {
			client.addAccount(a);
		}
	}
	
	public void printAll(Bank bank) {
		for(Client client : bank.getClients()) {
			System.out.print(client);
		}
	}
	
}
